import Vue from 'vue'
import Router from 'vue-router'
import Login from '../views/Login.vue'

Vue.use(Router)

const routes = [
  {
    path: '/',
    name: 'home',
    children: [
      {
        path: '/index',
        name: 'index',
        component: () => import('../views/Index.vue')
      }
    ],
    component: () => import('@/views/Home.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: Login
  }
]
const router = new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})
export default router
